package com.example.iitematicviewer.util.uploadFile;

import com.alibaba.fastjson.JSONObject;
import com.example.iitematicviewer.constant.ExceptionConstant;
import com.example.iitematicviewer.vo.ResultVO;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

@Service
public class UploadFileJudgingEmptinessService {

    public ResultVO judgingEmptiness(HttpServletRequest request,ResultVO resultVO){
            String fileName = request.getParameter(UploadFileConstant.file_name);
            if (StringUtils.isEmpty(fileName)) {
                throw new RuntimeException(UploadFileExceptionConstant.MUSTFILENAME);
            }
        return resultVO;
    }

}
